package com.mohan.service;

import java.util.List;

import com.mohan.bean.ArticleListInfo;
import com.mohan.pojo.Article;
import com.mohan.pojo.Comment;
import com.mohan.pojo.Content;
import com.mohan.pojo.Img;
import com.mohan.pojo.Reply;
import com.mohan.req.ChgArticleClassReq;
import com.mohan.req.ChgExamineReq;
import com.mohan.req.ChgIsOpenReq;
import com.mohan.req.ChgRecommendReq;
import com.mohan.req.ChgStatusReq;

public interface ArticleService {
	
	public void insertOneArticle(Article article) throws Exception;
	public int getLastArticleId() throws Exception;
	public List<Article> getArticles() throws Exception;
	public void updateContentIds(Article article) throws Exception;	
	public int getRoleByArticleId(int articleId) throws Exception;
	public List<Article> getArticleList(String userid) throws Exception;
	public Article getArticle(int articleId) throws Exception;
	public void deleteArticle(int articleId) throws Exception;
	public void updateArticleByArticleId(Article article) throws Exception;
	public Integer getCountByUserId(String userId) throws Exception;
	public List<Article> getArticleListByPageM(ArticleListInfo listInfo) throws Exception;
	public List<Article> getArticleListByPageS(ArticleListInfo listInfo) throws Exception;
	public List<Article> getArticleListByPageO(ArticleListInfo listInfo) throws Exception;
	public void setArticleStatus(ChgStatusReq statusReq) throws Exception;
	public void setArticleExamine(ChgExamineReq examineReq) throws Exception;
	public void setArticleRecommend(ChgRecommendReq recommendReq) throws Exception;
	public void setArticleIsOpen(ChgIsOpenReq isOpenReq) throws Exception;
	public void setArticleClass(ChgArticleClassReq classReq) throws Exception;
	
	public void insertContent(Content content) throws Exception;
	public int getLastContentId() throws Exception;
	public void updateImgIds(Content content) throws Exception;
	public List<Content> getContents(int articleid) throws Exception;
	public Content getContentByContentId(int contentId) throws Exception;
	public void updateContent(Content content) throws Exception;
	public void deleteContent(int contentId) throws Exception;
	
	public void insertOneImg(Img img) throws Exception;
	public int getLastImgId() throws Exception;
	public List<Img> getImgs(int contentid) throws Exception;
	public Img getImgByImgId(int imgId) throws Exception;
	public void deleteImgByImgId(int imgId) throws Exception;
	public void updateImgByImgId(Img img) throws Exception;
	
	public List<Comment> getComments(int articleid) throws Exception;
	
	public List<Reply> getReplys(int commentid) throws Exception;
}
